<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-bind单向数据绑定</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 50%;
            text-align: center;
        }
        
        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app">
        <p>{{url}}</p>
        <p><a :href="url">百度</a></p>
        <p><a :href="'url'">百度</a></p>
        <p><a :href="'http'+url">百度</a></p>
        <p><img :src="src"></p>
        <input type="text" v-model="url" />
    </div>
    <script>
        const v_app = Vue.createApp({
            data() {
                return {
                    url: "www.baidu.com",
                    src: "../../img/img_0.png"
                }
            }
        });
        v_app.mount("#app");
    </script>
</body>

</html>